package cn.cs.client;

import cn.cs.common.Page;
import cn.cs.config.CsConfiguration;
import cn.cs.fallback.AgentTypeFallBack;
import cn.cs.fallback.AppsettlementFallBack;
import cn.cs.pojo.AgentType;
import cn.cs.pojo.AppSettlement;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-user-provider", configuration = CsConfiguration.class, fallback = AppsettlementFallBack.class)
public interface RestAppSettlementClient {

    @RequestMapping(value = "/getAppSettlementById", method = RequestMethod.POST)
    public Map<String, String> getAppSettlementById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getAppSettlementListByMap", method = RequestMethod.POST)
    public List<AppSettlement> getAppSettlementListByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getAppSettlementCountByMap", method = RequestMethod.POST)
    public Integer getAppSettlementCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/addAppSettlement", method = RequestMethod.POST)
    public Integer addAppSettlement(@RequestBody AppSettlement appSettlement) throws Exception;

    @RequestMapping(value = "/modifyAppSettlement", method = RequestMethod.POST)
    public Integer modifyAppSettlement(@RequestBody AppSettlement appSettlement) throws Exception;

    @RequestMapping(value = "/deleteAppSettlementById", method = RequestMethod.POST)
    public Integer deleteAppSettlementById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/updateAppSettlementState", method = RequestMethod.POST)
    public Integer updateAppSettlementState(@RequestParam("id")String id, @RequestParam("personId")String personId)throws Exception;

}

